/**
 * Demonstrates a range of Button options the framework offers out of the box
 */
Ext.define('cloud.view.area.AreaEdit', {
    extend: 'Ext.form.FormPanel',
    xtype: 'areaedit',

    requires: ['Ext.form.Panel', 'Ext.form.FieldSet', 'Ext.field.Select', 'Ext.field.Hidden'],
    config: {
        //style:'font-size:14px',
        title: '编辑地区',
        items: [
            {
                xtype: 'toolbar',
                docked: 'bottom',
                layout: {
                    type: 'hbox',
                    pack: 'end'
                },
                items: [
                    {
                        id: 'area_edit_submit',
                        iconMask: true,
                        scope: this,
                        cls:'x-button2',
                        text: '提交',
                        style: 'float:right'
                    }
                ]
            },
            {
                xtype: 'fieldset',
                title: '编辑地区',
                defaults: {
                    labelwidth: '20%',
                    xtype: 'textfield',
                    required: true,
                    clearIcon: true
                },
                items: [
                    {
                        xtype: 'hiddenfield',
                        name: 'cadid'
                    },
                    {
                        name: 'name',
                        label: '城市',
                        readOnly:true
                    },
                    {
                        xtype: 'selectfield',
                        store: 'TimeStore',
                        id: 'starttime',
                        name: 'starttime',
                        label: '开始时间'
                    },
                    {
                        xtype: 'selectfield',
                        store: 'TimeStore',
                        id: 'endtime',
                        name: 'endtime',
                        label: '结束时间'
                    },
                    {
                        xtype: 'togglefield',
                        name: 'status',
                        id:'status',
                        label: '是否启用',
                        labelWidth: '30%'
                    }
                ]
            }
        ]
    }
});
